import request from '@/utils/request'
// 查询设备分组列表
export function listDeviceGroup(query) {
  return request({
    url: '/device/deviceGroup/page',
    method: 'get',
    params: query
  })
}

// 查询设备分组详细
export function getDeviceGroup(id) {
  return request({
    url: '/device/deviceGroup/info?id='+id,
    method: 'get'
  })
}

// 新增设备分组
export function addDeviceGroup(data) {
  return request({
    url: '/device/deviceGroup/save',
    method: 'post',
    data: data
  })
}

// 修改设备分组
export function editDeviceGroup(data) {
  return request({
    url: '/device/deviceGroup/edit',
    method: 'post',
    data: data
  })
}

// 删除设备分组
export function delDeviceGroup(id) {
  return request({
    url: '/device/deviceGroup/del?id='+id,
    method: 'delete'
  })
}

// 启用设备分组
export function enable(id) {
  return request({
    url: '/device/deviceGroup/enable?id='+id,
    method: 'get'
  })
}

// 禁用设备分组
export function disable(id) {
  return request({
    url: '/device/deviceGroup/disable?id='+id,
    method: 'get'
  })
}
